﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kaiser.Models.JsonModels;
using Kaiser.Models;
using Kaiser.Modules.CMS.Models;
using Kaiser.Modules.CMS.Models.InputModels;
namespace Kaiser.Modules.CMS.Services
{
    public interface ICMSManageService
    {
        #region 分类管理
        void InsertCategory(CategoryInput model);

        DataGrid<CategoryInput> GetCategoryAll(CategorySearch search, PagingInfo pageinfo);

        void UpdateCategory(CategoryInput model);

        int DeleteCategory(string id);

        int DeleteCategoryList(string ids);

        CategoryInput GetCategory(string Id);
        #endregion


        #region 内容管理

        DataGrid<ContentInput> QueryContent(CategorySearch search, PagingInfo pageinfo);

        /// <summary>
        /// 保持内容，同时新增关系表
        /// </summary>
        /// <param name="model"></param>
        /// <param name="CategoryId"></param>
        void InsertContent(ContentInput model,IList<CategoryContentInput> cateModel);


        /// <summary>
        /// 修改内容，同时修改关系表
        /// </summary>
        /// <param name="model"></param>
        void UpdateContent(ContentInput model, IList<CategoryContentInput> cateModel);

        /// <summary>
        /// 删除内容，同时删除关系
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        void DeleteContent(string id);


        /// <summary>
        /// 删除多条内容
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        void DeleteContentList(string ids);

        ContentInput GetContent(string id);

        #endregion

        IList<CategoryTree> CategoryTreeList(CategorySearch search, PagingInfo pageinfo);
    }
}
